classdef Surface
    properties
        parametera;
        parameterb
        domainx;
        domainy;
        value;
        b;
    end
    methods
        function B = Surface(z)
            pro = {'输入参数a的值（向量）','输入参数b的值（向量）','输入x定义域（向量）','输入y定义域（向量）','输入函数公式（参数为a和b，自变量为x和y）'};
            answer = inputdlg(pro,'初始化曲线',[1,20]);
            syms a b x y;
            %转换输入值的格式
            answer{1} = eval(answer{1});
            answer{2} = eval(answer{2});
            answer{3} = eval(answer{3});
            answer{4} = eval(answer{4});
            answer{5} = eval(answer{5});
            %给类的成员赋值
            B.parametera = answer{1};
            B.parameterb = answer{2};
            B.domainx = answer{3};
            B.domainy = answer{4};
            B.value = answer{5};
            B.b= z;
        end
    end
end
    